package Janelas.SQL;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class Inicial extends JFrame {

	private static final long serialVersionUID = 2L;
	
	private JPanel contentPane;
	private JTextField senha;
	private JTextField CPF;

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Inicial frame = new Inicial();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	public Inicial() {
		setResizable(false);
		setTitle("Login - Occurence Safe");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(430, 250, 409, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblOccurenceSafe = new JLabel("Occurence Safe");
		lblOccurenceSafe.setFont(new Font("Trebuchet MS", Font.BOLD | Font.ITALIC, 27));
		lblOccurenceSafe.setBounds(104, 11, 194, 32);
		contentPane.add(lblOccurenceSafe);
		
		JLabel lblNmeroDeCadastro = new JLabel("CPF:");
		lblNmeroDeCadastro.setBounds(10, 63, 34, 14);
		contentPane.add(lblNmeroDeCadastro);
		
		JLabel label_1 = new JLabel("Senha:");
		label_1.setBounds(10, 88, 47, 14);
		contentPane.add(label_1);
		
		senha = new JTextField();
		senha.setColumns(10);
		senha.setBounds(54, 85, 112, 20);
		contentPane.add(senha);
		
		CPF = new JTextField();
		CPF.setColumns(10);
		CPF.setBounds(54, 60, 112, 20);
		contentPane.add(CPF);
		
		JButton btnOK = new JButton("OK");
		btnOK.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Principal tela1 = new Principal();
				tela1.setVisible(true);
				dispose();
			}
		});
		btnOK.setBounds(341, 238, 52, 23);
		contentPane.add(btnOK);
		
		JButton cadastrar = new JButton("Cadastrar");
		cadastrar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				CadastroUser tela1 = new CadastroUser();
				tela1.setVisible(true);
			}
		});
		cadastrar.setBounds(10, 238, 101, 23);
		contentPane.add(cadastrar);
		
		JLabel lblAindaNo = new JLabel("Ainda n\u00E3o \u00E9 cadastrado? Clique aqui!");
		lblAindaNo.setBounds(10, 213, 212, 14);
		contentPane.add(lblAindaNo);
	}
}